#include <igraph.h>
#include <stdio.h>
#include "../global.h"



int main(int argc, char **argv){

  igraph_i_set_attribute_table(&igraph_cattribute_table);

  (void) argc;
  (void) argv;
  
  igraph_t graph;

  igraph_empty(&graph, 12, 0);

  // Generate room surfaces:
  int i;
  roominfo *ri;
  char str[20];

  for(i = 0; i <12; i++){ 

    ri = (roominfo *) malloc(sizeof(roominfo));

    ri->w = rand()%10;
    ri->h = rand()%10;
    
    set_roominfo(&graph, i, ri);
  }
  


  
  // The generated graphe is the one on Adam's paper on page 34
  igraph_add_edge(&graph,0,1);
  igraph_add_edge(&graph,1,2);
  igraph_add_edge(&graph,2,3);
  igraph_add_edge(&graph,2,4);
  igraph_add_edge(&graph,2,5);
  igraph_add_edge(&graph,5,6);
  igraph_add_edge(&graph,4,7);
  igraph_add_edge(&graph,7,8);
  igraph_add_edge(&graph,7,9);
  igraph_add_edge(&graph,7,10);
  igraph_add_edge(&graph,7,11);
  igraph_add_edge(&graph,9,10);
  igraph_add_edge(&graph,10,11);

  printf("Size Evaluator 1\n");
  printf("taille du donjon : %f\n", sizeevaluator1(graph)); // Validation OK

  printf("\nSize Evaluator 2\n");
  printf("taille du donjon : %f\n", sizeevaluator2(graph)); // Validation OK

  printf("\nSize Evaluator 3\n");
  printf("taille du donjon : %f\n", sizeevaluator3(graph)); // Validation OK

  printf("\nSize Evaluator 4\n");
  printf("taille du donjon : %f\n", sizeevaluator4(graph,0,6)); // Validation OK
  
  

  return 0;

}
